const Role = require("../model/role.model")



class RoleService {
    async createRole(role_name, jurisdiction, is_state) {
        return await Role.create({role_name, jurisdiction, is_state})
    }

    async getRoleInfo(id) {
        const res = await Role.findOne({where: {id: id}})
        return res.dataValues ? res.dataValues : null
    }

    async getRoleTable() {
   
        return await Role.findAll()
    }
}


module.exports=new RoleService()
